[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Dot Leader Tabs How to make dot leader line
Dot leader tabs are useful when you are creating, e.g. directories and
indexes. An example of a dot leader tab:
+---------------------------------------------------------------------+
| Article Title Issue/Paqe |
| |
| Common transforms............................................C-9 |
| Data dictionary..............................................C-13 |
| Dot leader tabs..............................................C-7 |
| Group on number of records...................................C-ll |
| How one R&R user produced mailing labels using IF/THEN logic C-2 |
+---------------------------------------------------------------------+
Note how a variable number of dots is automatically inserted between each
topic and the corresponding page number. Since the dot leader tab involves
repeating a character a variable number of times, it is a good candidate
for both the REPLICATE function and the string concatenation.
We could use this technique to improve the appearance and readability of a
complete index of all articles that have appeared a magazine. To print
this report, we would create a database consisting of three character
fields, TITLE, ISSUE, and PAGE. Here is a sample report. Then we would
create two calculated fields, one to contain the title and dot leader and
the other to contain the issue and page number. The expressions that
define these fields are as follows.
Title Dots = TITLE - REPLICATE('.',80)
Issue Page = ISSUE + '-' + PAGE
The Issue Page field simply concatenates the ISSUE with a dash and the
PAGE. The Title Dots field is defined as the actual article title followed
by a string of 80 periods. There are two points of interest in the
expression. First, why use the minus (-) string concatenation operator
instead of the more common plus (+) operator? Second, why replicate the
period 80 times?
Since the titles vary in length, the shorter titles will have trailing
spaces that must somehow be removed. You can either use the TRIM function
with the plus operator, or use just the minus operator. We selected the
minus operator to avoid using the TRIM function.
The number of dots has to be sufficient to handle the shortest possible
title. We selected 80 because it is the page width in columns. This gives
us the flexibility to change the field width on the screen without running
out of dots.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson